import request from '@/utils/request'

// 获取检测信息列表
export function getDetectionInfo(searchName, perPage, page) {
  const data = {
    searchName, perPage, page
  }
  return request({
    url: 'api/v1/backend/check_report',
    method: 'post',
    data
  })
}

// 提交检测信息
export function submit(
  sampleName,
  businessId,
  samplePhoto,
  detector,
  testingStandard,
  testItem,
  testResults,
  isQualified
) {
  const data = {
    sampleName,
    businessId,
    samplePhoto,
    detector,
    testingStandard,
    testItem,
    testResults,
    isQualified
  }
  return request({
    url: 'api/v1/backend/check_report/add',
    method: 'post',
    data
  })
}
